package cn.acheng1314.im.socket.model;

import cn.acheng1314.im.common.model.MessageBean;
import cn.acheng1314.im.socket.constant.ProtobufType;

import java.io.Serializable;

/**
 * 服务端心跳请求
 */
public class PingMessage implements Serializable, MessageBean {

    private static final long serialVersionUID = 1L;

    private static final String TAG = "ping";

    private static final String content = "ping";

    private static PingMessage object = new PingMessage();

    private PingMessage() {

    }

    public static PingMessage getInstance() {
        return object;
    }

    @Override
    public String toString() {
        return TAG;
    }

    @Override
    public byte[] getBody() {
        return content.getBytes();
    }

    @Override
    public byte getType() {
        return ProtobufType.Ping;
    }

}
